package com.bzm.common.enums.plugins;

/**
 * @Description:消息类型
 * @author hemiao
 * @time:2022年9月29日 下午4:16:26
 */
public enum ImChatMsgTypeEnum {
	
	CONNECT(0,"连接"),
	
	TEXT(1,"文本"),
	
	IMG(2,"图片"),
	
	VOICE(3,"语音"),
	
	VIDEO(4,"视频");
	
	private Integer code;
    private String msg;
	
	private ImChatMsgTypeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
	
    public static String getChatVersionMsg(Integer code) {
    	if(code==null) {
    		return null;
    	}
        for (ImChatMsgTypeEnum o : ImChatMsgTypeEnum.values()) {
	        if (o.getCode().equals(code)) {
	            return o.msg;
	        }
        }
        return null;
    }

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}
}
